package com.kyzh.core.adapters

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.kyzh.core.pager.weal.video.VideoBaseFragment
import com.kyzh.core.pager.weal.video.VideoLikeFragment

class VideoBaseAdapter(val context: Fragment, val titles:ArrayList<String>):FragmentStateAdapter(context) {
    override fun getItemCount(): Int {
        return titles.size
    }

    override fun createFragment(position: Int): Fragment {
        return when(position){
            0-> VideoBaseFragment()
            else -> VideoLikeFragment()
        }
    }

}